package com.ruoyi.mobile.mapper;


import com.ruoyi.mobile.domain.Message;
import com.ruoyi.mobile.model.vo.MessageContentVo;
import com.ruoyi.mobile.model.vo.MessageVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageMapper {

    public int selectUnreadCount(@Param("userId") int userId, @Param("doctorId") int doctorId);

    public List<Integer> selectIdByDoctor(@Param("doctorId") int doctorId, @Param("offset") int offset, @Param("pageSize") int pageSize);

    public List<MessageVo> selectMessageList(List<Integer> list);


    public List<MessageContentVo> selectContentList(@Param("userId") int userId, @Param("doctorId") int doctorId, @Param("offset") int offset, @Param("pageSize") int pageSize, @Param("lastId") int lastId);

    public Integer updateReadFlag(@Param("userId") int userId, @Param("doctorId") int doctorId);


    public Integer insertMessage(Message message);

    public Integer selectUnreadCountByUserId(@Param("userId") int userId);

    public Integer insertList(List<Message> list);
}
